package unit17.mail;
import java.awt.List;
import java.io.Console;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Properties;

public class MailTEst {
	public static void main(String[] args) throws IOException {
		Properties props=new Properties();
		try(InputStream in=	Files.newInputStream(Paths.get("mail", "mail.properties"))){
			props.load(in);
		}
		java.util.List<String> lines=Files.readAllLines(Paths.get(args[0]), Charset.forName("UTF-8"));
		
		String 	from=lines.get(0);
		String 	to=lines.get(1);
		String subject=lines.get(2);
		
		StringBuilder builder =new StringBuilder();
		for(int x=3;x<lines.size();x++){
			builder.append(lines.get(x));
			builder.append("\n");
		}
		
		Console console=System.console();
		String password=new String(console.readPassword("Password: "));
		
	}
}
